Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 8 - Handlers / Command Handlers for Script Applications


Handlers for Stay-Open Script Applications

By default, a script application that receives a Run or Open command handles that single command and then quits. This allows it to perform a single task and get out of your way. In contrast, a stay-open script application (one saved with the Stay Open checkbox selected in the Script Editor's Save As dialog box) stays open after it's launched.

A stay-open script application can be used for any of these purposes:

All stay-open applications receive periodic Idle events. If a stay-open script application includes a handler for the Idle event, it can perform periodic actions whenever it is not responding to other events. If a stay-open script application includes a handler for the Quit event, it can perform some action, such as checking with the user, before quitting.


Subtopics
Idle Handlers
Quit Handlers
Interrupting a Script Application's Handlers

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996